{% extends "base.html" %}

{% block content %}
<div class="login-form">
    <h2>设置新密码</h2>
    {% if validlink %}
        <form method="post">
            {% csrf_token %}
            {{ form.as_p }}
            <button type="submit">确认修改</button>
        </form>
    {% else %}
        <p>密码重置链接无效或已过期。</p>
        <p>请重新申请<a href="{% url 'password_reset' %}">密码重置</a>。</p>
    {% endif %}
</div>
{% endblock %} 